    <h2>Quản lý đơn đặt hàng</h2> 
                    
<table id="rounded-corner" summary="2007 Major IT Companies' Profit">
    <thead>
    	<tr>
            <th scope="col" class="rounded-company">Mã</th>
            <th scope="col" class="rounded">Tên người đặt hàng</th>
            <th scope="col" class="rounded">Ngày đặt hàng</th>
            <th scope="col" class="rounded">Trạng thái</th>
            <th scope="col" class="rounded">Cập nhật trạng thái</th>
            <th scope="col" class="rounded-q4">Xóa</th>
        </tr>
    </thead>
        <tfoot>
    	<tr>
			<td class="rounded-foot-left">&nbsp;</td>
            <td colspan="4">&nbsp;</td>
        	<td class="rounded-foot-right">&nbsp;</td>
        </tr>
    </tfoot>
    <tbody>
    	<?php
			$sql = "SELECT d.ma, n.tenguoidung, d.ngay, t.ten FROM dondathang d, nguoidung n, trangthaidondathang t WHERE d.manguoidung = n.manguoidung AND d.matrangthai = t.ma";
			$result = DataProvider::ExecuteQuery($sql);
			while($row = mysql_fetch_array($result))
			{
				?>
                	<tr>
                        <td><?php echo $row["ma"]; ?></td>
                        <td><?php echo $row["tenguoidung"]; ?></td>
                        <td><?php echo $row["ngay"]; ?></td>
                        <td><?php echo $row["ten"]; ?></td>
                       	<td><a href="./index.php?act=4&sub=2&id=<?php echo $row["ma"];?>"><img src="./images/user_edit.png" alt="" title="" border="0" /></a></td>
                        <td><a href="./index.php?act=4&sub=3&id=<?php echo $row["ma"];?>" class="ask"><img src="./images/trash.png" alt="" title="" border="0" /></a></td>
                    </tr>
                <?php	
			}
		?>
    </tbody>
</table>